#include<iostream>
#include<cstdio> 
using namespace std;
unsigned long long a[21];
int n;
int main(){
	freopen("rook.in","r",stdin);
	freopen("rook.out","w",stdout);
	cin>>n;
	a[1]=1;
	for(int i=2;i<=n;i++){
		a[i]=a[i-1]*i;
	}
	cout<<a[n];
	return 0;
}
